#ifndef LOGINWIDGET_H
#define LOGINWIDGET_H

#include "LoginWidget_global.h"
#include "../BaseWidgets/FramelessWidget.h"

#include "LeftLoginWidget.h"
#include "RightWidght.h"
#include <QIcon>

#include <QHBoxLayout>
#include <QVBoxLayout>


namespace UserManagementSystem {
class LOGINWIDGET_EXPORT LoginWidget:public FramelessWidget
{
    Q_OBJECT
public:
    LoginWidget(QWidget* parent=nullptr);





private:

    ///@brief 绘制圆角
    virtual void paintEvent(QPaintEvent *event) override;

    ///@brief 设置窗口的默认布局
    void SetDefaultLayout();

    ///@brief 登录窗口的默认样式
    void SetDefaultStyle();
    ///@brief 加载图标
    void LodeIcon();

    ///@brief 槽函数
    void On_MinimumBtn_Clicked();
    void On_CloseBtn_Clicked();
private:

    //左右两个窗口的布局
    QVBoxLayout* m_mainLayout=nullptr;
    QHBoxLayout* m_btnsLayout=nullptr;
    QHBoxLayout* m_subLayout=nullptr;


    ///@brief 左右两个窗口
    UserManagementSystem::LeftLoginWidget *m_leftWidget=nullptr;

    UserManagementSystem::RightWidght* m_rightWidget=nullptr;

    //关闭窗口按钮
    QPushButton* m_closeBtn=nullptr;

    //最小化窗口按钮
    QPushButton* m_minimumBtn=nullptr;


    //图标
    QIcon m_minIcon;
    QIcon m_closeIcon;
};

}

#endif // LOGINWIDGET_H
